package com.group.nonefornow;

import org.newdawn.slick.geom.Rectangle;

public class Ball {

	private int x;
	private int y;
	
	private int width;
	private int height;
	
	private boolean stops = false;
	
	private Rectangle rect = null;
	
	public Ball(int x, int y, int width, int height) {
		this.x = x;
		this.y = y;
		this.width = width;
		this.height = height;
		rect = new Rectangle(x, y, width, height);
	}
	
	public int getX() {
		return this.x;
	}
	
	public int getY() {
		return this.y;
	}
	
	public void setX(int x) {
		this.x = x;
		this.rect.setX(x);
	}
	
	public void setY(int y) {
		this.y = y;
		this.rect.setY(y);
	}
	
	public int getWidth() {
		return this.width;
	}
	
	public int getHeight() {
		return this.height;
	}
	
	public void setWidth(int width) {
		this.width = width;
	}
	
	public void setHeight(int height) {
		this.height = height;
	}
	
	public Rectangle getRect() {
		return this.rect;
	}
	
	public boolean doesStop() {
		return this.stops;
	}
	
	public void setDoesStop(boolean b) {
		this.stops = b;
	}
	
	public boolean intersects(Ball other) {
		if (this.y - this.height == other.y + other.height*2)
			return true;
		else
			return false;
	}
}
